<script language="javascript" src="/public/js/LodopFuncs.js"></script>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
	<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
</object> 
<style type="text/css">
.script_table td.label {
	width:80px;
}
.script_table td {
	border-bottom:1px solid #eee;
	line-height:20px;
	padding:5px;
	text-align:left;
}
.script_table2 td.label {
	width:80px;
}
.script_table2 td {
	border-bottom:1px solid #eee;
	line-height:20px;
	padding:5px;
	text-align:left;
}
.script_table2 th {
	border-bottom:1px solid #eee;
	line-height:20px;
	padding:5px;
	background:#f1f1f1;
	text-align:left;
}
.testkeyul li, .slist li {
	width:280px;
	height:25px;
	line-height:25px;
	overflow:hidden;
	float:left;
	margin:0px;
	padding:0px;
	background:url(/public/images/licon.gif) left center no-repeat;
	padding-left:14px;
}
.slist li {
	width:190px;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="script_table">
  <tr>
    <td class="label">编码：</td>
    <td><select id="code1">
        <option value="128A">128A</option>
        <option value="128B">128B</option>
        <option value="128C">128C</option>
        <option value="128Auto">128Auto</option>
        <option value="EAN8">EAN8</option>
        <option value="EAN13">EAN13</option>
        <option value="EAN128A">EAN128A</option>
        <option value="EAN128B">EAN128B</option>
        <option value="EAN128C">EAN128C</option>
        <option value="Code39">Code39</option>
        <option value="39Extended">39Extended</option>
        <option value="Code93">Code93</option>
      </select></td>
  </tr>
  <tr>
    <td class="label">打印字符：</td>
    <td><input type="text" value="<?php echo $info['OUTERCODE']?>" class="input-text" id="text1"  size="40"></td>
  </tr>
  <tr>
    <td class="label">数量：</td>
    <td><input type="text" value="<?php echo $info['QUANTITY']?>" class="input-text" id="num1" ></td>
  </tr>
  <tr>
    <td colspan="2"><input type="button" value="打印预览" name="B3"  onclick="prn_Preview()">
      &nbsp;&nbsp;
      <input type="button" value="打印设计" name="B3" onClick="prn_Design()">
      <input type="button" value="生成条形码" name="B3" onClick="myShow1()" />
      </td>
  </tr>
</table>
<object id="LODOP1" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=400 height=100 >
  <param name="Caption" value="显示区">
  <param name="Border" value="0">
  <param name="Color" value="white">
  <embed id="LODOP_EM1" TYPE="application/x-print-lodop" width=400 height=100 border=0 Color="white" PLUGINSPAGE="install_lodop.exe">
</object>
<script language="javascript" type="text/javascript">  
        var LODOP; //声明为全局变量  
	function prn_Preview() {		
		CreatePrintPage();
	  	LODOP.PREVIEW();		
	};
	function prn_Design() {		
		CreatePrintPage();
		LODOP.PRINT_DESIGN();		
	};		
	function CreatePrintPage() {
		LODOP=getLodop(document.getElementById('LODOP1'),document.getElementById('LODOP_EM1')); 
		LODOP.PRINT_INITA(0,0,100,160,"打印条码");
		var text = document.getElementById('text1');
		var code = document.getElementById('code1');
		var num = document.getElementById('num1').value;
		var i = 1;
		for(i=1;i<=num;i++){			
			LODOP.ADD_PRINT_BARCODE(-20+(i%2==0?(i-1)*(47+10):(47+10)*i),34+(i%2 ?  0 : (307+100)),307,47,code.value,text.value+i);
			LODOP.SET_PRINT_STYLEA(0,"FontSize",12);
		}	
	};	
   	function myShow1() {
		LODOP=getLodop(document.getElementById('LODOP1'),document.getElementById('LODOP_EM1')); 	    	
		LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_内嵌显示演示11");
		LODOP.ADD_PRINT_BARCODE(28,34,227,147,"128A","AB123456789012");
		LODOP.PREVIEW();
		//LODOP.SHOW_CHART();
  	}; 

</script>
